package com.zj.system.controller;

import com.seventh.common.pojo.R;
import com.zj.system.pojo.vo.LoginVo;
import com.zj.system.service.LoginSer;
import org.apache.shiro.crypto.hash.Md5Hash;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: clms-seventh
 * @description: 登陆的控制层
 * @author: 张静
 * @create: 2021-07-16 20:52
 **/
@RestController

@RequestMapping("system")

public class LoginController {
    @Autowired
    private LoginSer loginSer;
    @PostMapping("login")
    public R login(@RequestBody LoginVo vo){

        return loginSer.login(vo);
    }
    @GetMapping("parse")
    public R solvtoken(String token){
        return loginSer.solvtoken(token);
    }
    public static void main(String[] args) {
        Md5Hash md5Hash=new Md5Hash("123456","admin",1024);
        System.out.println(md5Hash);
    }
}
